/*Copyright ©2016 TommyLemon(https://github.com/TommyLemon/APIJSON)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.*/

package com.yuantong.xyerp.rest.config.APIJson;

import apijson.RequestMethod;
import apijson.column.ColumnUtil;
import apijson.framework.APIJSONCreator;
import apijson.framework.APIJSONSQLConfig;
import apijson.orm.AbstractSQLConfig;
import apijson.orm.SQLConfig;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
/***
 * 作用: 配置库与 主键UUID, 驼峰映射
 * 行为:
 * @Author JianguoYin
 * @Date 下午11:01 2021/7/2
 **/
public class XyerpSQLConfig extends APIJSONSQLConfig {

	public XyerpSQLConfig() {
		super();
	}
	public XyerpSQLConfig(RequestMethod method, String table) {
		super(method, table);
	}


	static {
		DEFAULT_DATABASE = DATABASE_MYSQL;
		DEFAULT_SCHEMA = "xyerp";
		// 字段名映射配置 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
		Map<String, Map<String, String>> tableKeyColumnMap = new HashMap<>();
		/** User 开始*/
		Map<String, String> userKeyColumnMap = new HashMap<>();
		userKeyColumnMap.put("realName","real_name");
		userKeyColumnMap.put("organizationId","organization_id");
		userKeyColumnMap.put("roleId","role_id");
		userKeyColumnMap.put("loginName", "login_name");
		userKeyColumnMap.put("entryDate", "entry_date");
		userKeyColumnMap.put("sfzNo", "sfz_no");
		userKeyColumnMap.put("emergencyContact", "emergency_contact");
		userKeyColumnMap.put("emergencyMobile", "emergency_mobile");
		userKeyColumnMap.put("householdRegister", "household_register");
		userKeyColumnMap.put("updateTime", "update_time");
		userKeyColumnMap.put("createTime", "create_time");
		userKeyColumnMap.put("deleteStatus", "delete_status");

		tableKeyColumnMap.put("User", userKeyColumnMap);
		/** User 结束*/

		/** Account 开始*/
		Map<String, String> accountKeyColumnMap = new HashMap<>();
		accountKeyColumnMap.put("bankName","bank_name");
		accountKeyColumnMap.put("updateTime","update_time");
		accountKeyColumnMap.put("taxNo","tax_no");
		accountKeyColumnMap.put("transportationPay","transportation_pay");
		accountKeyColumnMap.put("createTime","create_time");
		accountKeyColumnMap.put("creatorId","creator_id");
		accountKeyColumnMap.put("currentBalance","current_balance");
		accountKeyColumnMap.put("deleteStatus","delete_status");
		tableKeyColumnMap.put("Account", accountKeyColumnMap);
		/** Account 结束*/


		/** Allocation 开始*/
		Map<String, String> allocationtKeyColumnMap = new HashMap<>();
		allocationtKeyColumnMap.put("categoryCode","category_code");
		allocationtKeyColumnMap.put("operatorId","operator_id");
		allocationtKeyColumnMap.put("docNo","doc_no");
		allocationtKeyColumnMap.put("sourceWarehouseId","source_warehouse_id");
		allocationtKeyColumnMap.put("targetWarehouseId","target_warehouse_id");
		allocationtKeyColumnMap.put("transferTime","transfer_time");
		allocationtKeyColumnMap.put("updateTime","update_time");
		allocationtKeyColumnMap.put("creatorId","creator_id");
		allocationtKeyColumnMap.put("createTime","create_time");
		tableKeyColumnMap.put("Allocation",allocationtKeyColumnMap);
		/** Allocation 结束*/


		/** Attachment 开始*/
		Map<String, String> attachmentKeyColumnMap = new HashMap<>();
		attachmentKeyColumnMap.put("masterId","master_id");
		attachmentKeyColumnMap.put("contentType","content_type");
		attachmentKeyColumnMap.put("fileName","file_name");
		attachmentKeyColumnMap.put("filePath","file_path");
		attachmentKeyColumnMap.put("fileSize","file_size");
		attachmentKeyColumnMap.put("md5Value","md5_value");
		attachmentKeyColumnMap.put("sha1Value","sha1_value");
		attachmentKeyColumnMap.put("uploadTime","upload_time");
		attachmentKeyColumnMap.put("uploaderId","uploader_id");
		attachmentKeyColumnMap.put("deleteTime","delete_time");
		tableKeyColumnMap.put("Attachment",attachmentKeyColumnMap);
		/** Attachment 结束*/


		/** CashFlow 开始*/
		Map<String, String> cashFlowKeyColumnMap = new HashMap<>();
		cashFlowKeyColumnMap.put("associationId","association_id");
		cashFlowKeyColumnMap.put("accountId","account_id");
		cashFlowKeyColumnMap.put("docNo","doc_no");
		cashFlowKeyColumnMap.put("merchantId","merchant_id");
		cashFlowKeyColumnMap.put("merchantName","merchant_name");
		cashFlowKeyColumnMap.put("merchantBank","merchant_bank");
		cashFlowKeyColumnMap.put("merchantNumber","merchant_number");
		cashFlowKeyColumnMap.put("merchantAddress","merchant_address");
		cashFlowKeyColumnMap.put("cashTime","cash_time");
		cashFlowKeyColumnMap.put("updateTime","update_time");
		cashFlowKeyColumnMap.put("createTime","create_time");
		cashFlowKeyColumnMap.put("creatorId","creator_id");
		cashFlowKeyColumnMap.put("operatorId","operator_id");
		tableKeyColumnMap.put("CashFlow",cashFlowKeyColumnMap);
		/** CashFlow 结束*/


		/** Category 开始*/
		Map<String, String> categoryKeyColumnMap = new HashMap<>();
		categoryKeyColumnMap.put("updateTime","update_time");
		categoryKeyColumnMap.put("createTime","create_time");
		categoryKeyColumnMap.put("creatorId","creator_id");
		tableKeyColumnMap.put("Category",categoryKeyColumnMap);
		/** Category 结束*/


		/** OperationLog 开始*/
		Map<String, String> operationLogKeyColumnMap = new HashMap<>();
		operationLogKeyColumnMap.put("businessId","business_id");
		operationLogKeyColumnMap.put("operatorId","operator_id");
		operationLogKeyColumnMap.put("operationResult","operation_result");
		operationLogKeyColumnMap.put("roleId","role_id");
		operationLogKeyColumnMap.put("operateTime","operate_time");
		tableKeyColumnMap.put("OperationLog",operationLogKeyColumnMap);
		/** OperationLog 结束*/


		/** ContractGoods 开始*/
		Map<String, String> contractGoodsKeyColumnMap = new HashMap<>();
		contractGoodsKeyColumnMap.put("sourceType","source_type");
		contractGoodsKeyColumnMap.put("contractId","contract_id");
		contractGoodsKeyColumnMap.put("categoryCode","category_code");
		contractGoodsKeyColumnMap.put("categoryName","category_name");
		contractGoodsKeyColumnMap.put("levelName","level_name");
		contractGoodsKeyColumnMap.put("levelOne","level_one");
		contractGoodsKeyColumnMap.put("levelTwo","level_two");
		contractGoodsKeyColumnMap.put("levelThree","level_three");
		contractGoodsKeyColumnMap.put("goodsId","goods_id");
		contractGoodsKeyColumnMap.put("goodsName","goods_name");
		contractGoodsKeyColumnMap.put("updateTime","update_time");
		contractGoodsKeyColumnMap.put("unitPrice","unit_price");
		contractGoodsKeyColumnMap.put("createTime","create_time");
		contractGoodsKeyColumnMap.put("creatorId","creator_id");
		tableKeyColumnMap.put("ContractGoods",contractGoodsKeyColumnMap);
		/** ContractGoods 结束*/


		/** ContractTemplate 开始*/
		Map<String, String> contractTemplateKeyColumnMap = new HashMap<>();
		contractTemplateKeyColumnMap.put("businessType","business_type");
		contractTemplateKeyColumnMap.put("contractType","contract_type");
		contractTemplateKeyColumnMap.put("templatePath","template_path");
		contractTemplateKeyColumnMap.put("updateTime","update_time");
		contractTemplateKeyColumnMap.put("createTime","create_time");
		contractTemplateKeyColumnMap.put("creatorTime","creator_time");
		contractTemplateKeyColumnMap.put("deleteStatus","delete_status");
		tableKeyColumnMap.put("ContractTemplate",contractTemplateKeyColumnMap);
		/** ContractTemplate 结束*/


		/** ContractTransportation 开始*/
		Map<String, String> contractTransportationKeyColumnMap = new HashMap<>();
		contractTransportationKeyColumnMap.put("sourceType","source_type");
		contractTransportationKeyColumnMap.put("contractNo","contract_no");
		contractTransportationKeyColumnMap.put("docNo","doc_no");
		contractTransportationKeyColumnMap.put("needPay","need_pay");
		contractTransportationKeyColumnMap.put("sourceId","source_id");
		contractTransportationKeyColumnMap.put("settlementType","settlement_type");
		contractTransportationKeyColumnMap.put("unitPrice","unit_price");
		contractTransportationKeyColumnMap.put("floorWeight","floor_weight");
		contractTransportationKeyColumnMap.put("floorFee","floor_fee");
		contractTransportationKeyColumnMap.put("actualWeight","actual_weight");
		contractTransportationKeyColumnMap.put("actualFee","actual_fee");
		contractTransportationKeyColumnMap.put("totalWeight","total_weight");
		contractTransportationKeyColumnMap.put("totalFee","total_fee");
		contractTransportationKeyColumnMap.put("updateTime","update_time");
		contractTransportationKeyColumnMap.put("createTime","create_time");
		contractTransportationKeyColumnMap.put("creatorId","creator_id");
		contractTransportationKeyColumnMap.put("startAreaCode","start_area_code");
		contractTransportationKeyColumnMap.put("startArea","start_area");
		contractTransportationKeyColumnMap.put("destinationAreaCode","destination_area_code");
		contractTransportationKeyColumnMap.put("destinationArea","destination_area");
		contractTransportationKeyColumnMap.put("deleteStatus","delete_status");
		tableKeyColumnMap.put("ContractTransportation",contractTransportationKeyColumnMap);
		/** ContractTransportation 结束*/

		/** ContractTransportationList 开始*/
		Map<String, String> contractTransportationListKeyColumnMap = new HashMap<>();
		contractTransportationListKeyColumnMap.put("contractTransportationId","contract_transportation_id");
		contractTransportationListKeyColumnMap.put("contractNo","contract_no");
		contractTransportationListKeyColumnMap.put("businessId","business_id");
		contractTransportationListKeyColumnMap.put("carNo","car_no");
		contractTransportationListKeyColumnMap.put("actualWeight","actual_weight");
		contractTransportationListKeyColumnMap.put("actualFee","actual_fee");
		contractTransportationListKeyColumnMap.put("driverName","driver_name");
		contractTransportationListKeyColumnMap.put("driverMobile","driver_mobile");
		contractTransportationListKeyColumnMap.put("driverSfzNo","driver_sfz_no");
		contractTransportationListKeyColumnMap.put("creatorId","creator_id");
		contractTransportationListKeyColumnMap.put("createTime","create_time");
		contractTransportationListKeyColumnMap.put("deleteStatus","delete_status");
		tableKeyColumnMap.put("ContractTransportationList",contractTransportationListKeyColumnMap);
		/** ContractTransportationList 结束*/


		/** Goods 开始*/
		Map<String, String> goodsKeyColumnMap = new HashMap<>();
		goodsKeyColumnMap.put("categoryCode","category_code");
		goodsKeyColumnMap.put("categoryName","category_name");
		goodsKeyColumnMap.put("levelOne","level_one");
		goodsKeyColumnMap.put("levelTwo","level_two");
		goodsKeyColumnMap.put("levelThree","level_three");
		goodsKeyColumnMap.put("specificationsType","specifications_type");
		goodsKeyColumnMap.put("paramName","param_name");
		goodsKeyColumnMap.put("updateTime","update_time");
		goodsKeyColumnMap.put("createTime","create_time");
		goodsKeyColumnMap.put("creatorId","creator_id");
		tableKeyColumnMap.put("Goods",goodsKeyColumnMap);
		/** Goods 结束*/


		/** GoodsPriceFix 开始*/
		Map<String, String> goodsPriceFixKeyColumnMap = new HashMap<>();
		goodsPriceFixKeyColumnMap.put("levelCode","level_code");
		goodsPriceFixKeyColumnMap.put("categoryName","category_name");
		goodsPriceFixKeyColumnMap.put("levelOneName","level_one_name");
		goodsPriceFixKeyColumnMap.put("marketCode","market_code");
		goodsPriceFixKeyColumnMap.put("fixedValue","fixed_value");
		goodsPriceFixKeyColumnMap.put("calculationType","calculation_type");
		goodsPriceFixKeyColumnMap.put("updateTime","update_time");
		goodsPriceFixKeyColumnMap.put("createTime","create_time");
		goodsPriceFixKeyColumnMap.put("creatorId","creator_id");
		tableKeyColumnMap.put("GoodsPriceFix",goodsPriceFixKeyColumnMap);
		/** GoodsPriceFix 结束*/


		/** MarketPrice 开始*/
		Map<String, String> marketPriceKeyColumnMap = new HashMap<>();
		marketPriceKeyColumnMap.put("levelOneCode","level_one_code");
		marketPriceKeyColumnMap.put("categoryName","category_name");
		marketPriceKeyColumnMap.put("levelOneName","level_one_name");
		marketPriceKeyColumnMap.put("marketCode","market_code");
		marketPriceKeyColumnMap.put("marketName","market_name");
		marketPriceKeyColumnMap.put("priceTime","price_time");
		marketPriceKeyColumnMap.put("createTime","create_time");
		marketPriceKeyColumnMap.put("creatorId","creator_Id");
		tableKeyColumnMap.put("MarketPrice",marketPriceKeyColumnMap);
		/** MarketPrice 结束*/


		/** Merchant 开始*/
		Map<String, String> merchantKeyColumnMap = new HashMap<>();
		merchantKeyColumnMap.put("extAgent","ext_agent");
		merchantKeyColumnMap.put("categoryCodeList","category_code_list");
		merchantKeyColumnMap.put("provinceId","province_id");
		merchantKeyColumnMap.put("cityId","city_id");
		merchantKeyColumnMap.put("areaId","area_id");
		merchantKeyColumnMap.put("contactsName","contacts_name");
		merchantKeyColumnMap.put("contactsMobile","contacts_mobile");
		merchantKeyColumnMap.put("contactsDepartment","contacts_department");
		merchantKeyColumnMap.put("contactsPosition","contacts_position");
		merchantKeyColumnMap.put("contactsEmail","contacts_email");
		merchantKeyColumnMap.put("invoiceName","invoice_name");
		merchantKeyColumnMap.put("invoiceCode","invoice_code");
		merchantKeyColumnMap.put("invoiceBank","invoice_bank");
		merchantKeyColumnMap.put("invoiceAccount","invoice_account");
		merchantKeyColumnMap.put("invoiceTele","invoice_tele");
		merchantKeyColumnMap.put("invoiceAddress","invoice_address");
		merchantKeyColumnMap.put("operatorId","operator_id");
		merchantKeyColumnMap.put("operatorTime","operator_time");
		merchantKeyColumnMap.put("updateTime","update_time");
		merchantKeyColumnMap.put("creatorId","creator_id");
		merchantKeyColumnMap.put("createTime","create_time");
		tableKeyColumnMap.put("Merchant",merchantKeyColumnMap);
		/** Merchant 结束*/


		/** ProductInCheckList 开始*/
		Map<String, String> productInCheckListKeyColumnMap = new HashMap<>();
		productInCheckListKeyColumnMap.put("checkReportId","check_report_id");
		productInCheckListKeyColumnMap.put("categoryCode","category_code");
		productInCheckListKeyColumnMap.put("categoryName","category_name");
		productInCheckListKeyColumnMap.put("levelOne","level_one");
		productInCheckListKeyColumnMap.put("levelTwo","level_two");
		productInCheckListKeyColumnMap.put("levelThree","level_three");
		productInCheckListKeyColumnMap.put("batchNo","batch_no");
		productInCheckListKeyColumnMap.put("goodsId","goods_id");
		productInCheckListKeyColumnMap.put("goodsName","goods_name");
		productInCheckListKeyColumnMap.put("checkResult","check_result");
		tableKeyColumnMap.put("ProductInCheckList",productInCheckListKeyColumnMap);
		/** ProductInCheckList 结束*/


		/** QualityCheckReport 开始*/
		Map<String, String> qualityCheckReportKeyColumnMap = new HashMap<>();
		qualityCheckReportKeyColumnMap.put("docNo","doc_no");
		qualityCheckReportKeyColumnMap.put("businessId","business_id");
		qualityCheckReportKeyColumnMap.put("warehouseId","warehouse_id");
		qualityCheckReportKeyColumnMap.put("goodsType","goods_type");
		qualityCheckReportKeyColumnMap.put("categoryName","category_name");
		qualityCheckReportKeyColumnMap.put("receiptType","receipt_type");
		qualityCheckReportKeyColumnMap.put("receiptId","receipt_id");
		qualityCheckReportKeyColumnMap.put("checkType","check_type");
		qualityCheckReportKeyColumnMap.put("checkResult","check_result");
		qualityCheckReportKeyColumnMap.put("goodsUsage","goods_usage");
		qualityCheckReportKeyColumnMap.put("attachmentPath","attachment_path");
		qualityCheckReportKeyColumnMap.put("grossWeight","gross_weight");
		qualityCheckReportKeyColumnMap.put("tareWeight","tare_weight");
		qualityCheckReportKeyColumnMap.put("checkWeight","check_weight");
		qualityCheckReportKeyColumnMap.put("updateTime","update_time");
		qualityCheckReportKeyColumnMap.put("createTime","create_time");
		qualityCheckReportKeyColumnMap.put("creatorId","creator_id");
		tableKeyColumnMap.put("QualityCheckReport",qualityCheckReportKeyColumnMap);
		/** QualityCheckReport 结束*/


		/** RawInCheckList 开始*/
		Map<String, String> rawInCheckListKeyColumnMap = new HashMap<>();
		rawInCheckListKeyColumnMap.put("receiptId","receipt_id");
		rawInCheckListKeyColumnMap.put("checkReportId","check_report_id");
		rawInCheckListKeyColumnMap.put("categoryCode","category_code");
		rawInCheckListKeyColumnMap.put("categoryName","category_name");
		rawInCheckListKeyColumnMap.put("levelOne","level_one");
		rawInCheckListKeyColumnMap.put("levelTwo","level_two");
		rawInCheckListKeyColumnMap.put("levelThree","level_three");
		rawInCheckListKeyColumnMap.put("goodsId","goods_id");
		rawInCheckListKeyColumnMap.put("goodsName","goods_name");
		rawInCheckListKeyColumnMap.put("checkRequirement","check_requirement");
		rawInCheckListKeyColumnMap.put("checkResult","check_result");
		tableKeyColumnMap.put("RawInCheckList",rawInCheckListKeyColumnMap);
		/** RawInCheckList 结束*/


		/** RoleMenu 开始*/
		Map<String, String> roleMenuKeyColumnMap = new HashMap<>();
		roleMenuKeyColumnMap.put("roleId","role_id");
		roleMenuKeyColumnMap.put("menuId","menu_id");
		tableKeyColumnMap.put("RoleMenu",roleMenuKeyColumnMap);
		/** RoleMenu 结束*/


		/** Transportation 开始*/
		Map<String, String> transportationKeyColumnMap = new HashMap<>();
		transportationKeyColumnMap.put("carNo","car_no");
		transportationKeyColumnMap.put("sfzNo","sfz_no");
		transportationKeyColumnMap.put("accountName","account_name");
		transportationKeyColumnMap.put("bankName","bank_name");
		transportationKeyColumnMap.put("updateTime","update_time");
		transportationKeyColumnMap.put("createTime","create_time");
		transportationKeyColumnMap.put("creatorId","creator_id");
		tableKeyColumnMap.put("Transportation",transportationKeyColumnMap);
		/** Transportation 结束*/


		/** UserLogin 开始*/
		Map<String, String> userLoginKeyColumnMap = new HashMap<>();
		userLoginKeyColumnMap.put("departmentId","department_id");
		userLoginKeyColumnMap.put("timeStamp","time_stamp");
		tableKeyColumnMap.put("UserLogin",userLoginKeyColumnMap);
		/** UserLogin 结束*/


		/** WarehouseReceipt 开始*/
		Map<String, String> warehouseReceiptKeyColumnMap = new HashMap<>();
		warehouseReceiptKeyColumnMap.put("businessId","business_id");
		warehouseReceiptKeyColumnMap.put("docNo","doc_no");
		warehouseReceiptKeyColumnMap.put("goodsType","goods_type");
		warehouseReceiptKeyColumnMap.put("categoryName","category_name");
		warehouseReceiptKeyColumnMap.put("warehouseId","warehouse_id");
		warehouseReceiptKeyColumnMap.put("totalWeight","total_weight");
		warehouseReceiptKeyColumnMap.put("updateTime","update_time");
		warehouseReceiptKeyColumnMap.put("createTime","create_time");
		warehouseReceiptKeyColumnMap.put("creatorId","creator_id");
		tableKeyColumnMap.put("WarehouseReceipt",warehouseReceiptKeyColumnMap);
		/** WarehouseReceipt 结束*/


		/** WarehouseReceiptList 开始*/
		Map<String, String> warehouseReceiptListKeyColumnMap = new HashMap<>();
		warehouseReceiptListKeyColumnMap.put("warehouseId","warehouse_id");
		warehouseReceiptListKeyColumnMap.put("warehouseReceiptId","warehouse_receipt_id");
		warehouseReceiptListKeyColumnMap.put("categoryCode","category_code");
		warehouseReceiptListKeyColumnMap.put("categoryName","category_name");
		warehouseReceiptListKeyColumnMap.put("levelOne","level_one");
		warehouseReceiptListKeyColumnMap.put("levelTwo","level_two");
		warehouseReceiptListKeyColumnMap.put("levelThree","level_three");
		warehouseReceiptListKeyColumnMap.put("goodsId","goods_id");
		warehouseReceiptListKeyColumnMap.put("goodsName","goods_name");
		warehouseReceiptListKeyColumnMap.put("batchNo","batch_no");
		warehouseReceiptListKeyColumnMap.put("confirmWeight","confirm_weight");
		warehouseReceiptListKeyColumnMap.put("confirmUnitPrice","confirm_unit_price");
		warehouseReceiptListKeyColumnMap.put("confirmQuantity","confirm_quantity");
		warehouseReceiptListKeyColumnMap.put("createTime","create_time");
		tableKeyColumnMap.put("WarehouseReceiptList",warehouseReceiptListKeyColumnMap);
		/** WarehouseReceiptList 结束*/


		/** WarehouseRecords 开始*/
		Map<String, String> warehouseRecordsKeyColumnMap = new HashMap<>();
		warehouseRecordsKeyColumnMap.put("categoryCode","category_code");
		warehouseRecordsKeyColumnMap.put("categoryName","category_name");
		warehouseRecordsKeyColumnMap.put("levelOne","level_one");
		warehouseRecordsKeyColumnMap.put("levelTwo","level_two");
		warehouseRecordsKeyColumnMap.put("levelThree","level_three");
		warehouseRecordsKeyColumnMap.put("goodsId","goods_id");
		warehouseRecordsKeyColumnMap.put("goodsName","goods_name");
		warehouseRecordsKeyColumnMap.put("warehouseId","warehouse_id");
		warehouseRecordsKeyColumnMap.put("updateTime","update_time");
		warehouseRecordsKeyColumnMap.put("lastRecordId","last_record_id");
		tableKeyColumnMap.put("WarehouseRecords",warehouseRecordsKeyColumnMap);
		/** WarehouseRecords 结束*/


		/** Role 开始*/
		Map<String, String> roleKeyColumnMap = new HashMap<>();
		roleKeyColumnMap.put("organizationId","organization_id");
		roleKeyColumnMap.put("dataRights","data_rights");
		roleKeyColumnMap.put("updateTime","update_time");
		roleKeyColumnMap.put("createTime","create_time");
		roleKeyColumnMap.put("creatorId","creator_id");
		roleKeyColumnMap.put("deleteStatus","delete_status");
		tableKeyColumnMap.put("Role",roleKeyColumnMap);
		/** Role 结束*/


		/** Organization 开始*/
		Map<String, String> organizationKeyColumnMap = new HashMap<>();
		organizationKeyColumnMap.put("categoryCodeList","category_code_list");
		organizationKeyColumnMap.put("principleId","principle_id");
		organizationKeyColumnMap.put("isWarehouse","is_warehouse");
		organizationKeyColumnMap.put("warehouseAddress","warehouse_address");
		organizationKeyColumnMap.put("marketCode","market_code");
		organizationKeyColumnMap.put("updateTime","update_time");
		organizationKeyColumnMap.put("createTime","create_time");
		organizationKeyColumnMap.put("creatorId","creator_id");
		tableKeyColumnMap.put("Organization",organizationKeyColumnMap);
		/** Organization 结束*/


		/** Contract 开始*/
		Map<String, String> contractKeyColumnMap = new HashMap<>();
		contractKeyColumnMap.put("businessType","business_type");
		contractKeyColumnMap.put("docNo","doc_no");
		contractKeyColumnMap.put("levelOne","level_one");
		contractKeyColumnMap.put("categoryCode","category_code");
		contractKeyColumnMap.put("contractNo","contract_no");
		contractKeyColumnMap.put("templateId","template_id");
		contractKeyColumnMap.put("contractDate","contract_date");
		contractKeyColumnMap.put("signBy","sign_by");
		contractKeyColumnMap.put("warehouseId","warehouse_id");
		contractKeyColumnMap.put("transportType","transport_type");
		contractKeyColumnMap.put("merchantId","merchant_id");
		contractKeyColumnMap.put("agentId","agent_id");
		contractKeyColumnMap.put("contactsName","contacts_name");
		contractKeyColumnMap.put("contactsTel","contacts_tel");
		contractKeyColumnMap.put("bankName","bank_name");
		contractKeyColumnMap.put("marketCode","market_code");
		contractKeyColumnMap.put("startDate","start_date");
		contractKeyColumnMap.put("endDate","end_date");
		contractKeyColumnMap.put("averageMarketPrice","average_market_price");
		contractKeyColumnMap.put("chargesType","charges_type");
		contractKeyColumnMap.put("chargesValue","charges_value");
		contractKeyColumnMap.put("totalPayment","total_payment");
		contractKeyColumnMap.put("totalWeight","total_weight");
		contractKeyColumnMap.put("advancePayment","advance_payment");
		contractKeyColumnMap.put("advancePaymentRatio","advance_payment_ratio");
		contractKeyColumnMap.put("actualPayment","actual_payment");
		contractKeyColumnMap.put("invoiceAmount","invoice_amount");
		contractKeyColumnMap.put("attachmentPath","attachment_path");
		contractKeyColumnMap.put("updateTime","update_time");
		contractKeyColumnMap.put("createTime","create_time");
		contractKeyColumnMap.put("creatorId","creator_id");
		contractKeyColumnMap.put("processRemark","process_remark");
		contractKeyColumnMap.put("nextProcessState","next_process_state");
		contractKeyColumnMap.put("deleteStatus","delete_status");
		contractKeyColumnMap.put("priceType","price_type");
		contractKeyColumnMap.put("salePresidentConfirm","sale_president_confirm");
		contractKeyColumnMap.put("payState","pay_state");
		tableKeyColumnMap.put("Contract",contractKeyColumnMap);
		/** Contract 结束*/


		/** Invoice 开始*/
		Map<String, String> invoiceKeyColumnMap = new HashMap<>();
		invoiceKeyColumnMap.put("invoceTitle","invoice_title");
		invoiceKeyColumnMap.put("taxRate","tax_rate");
		invoiceKeyColumnMap.put("buyerName","buyer_name");
		invoiceKeyColumnMap.put("buyerTaxNo","buyer_tax_no");
		invoiceKeyColumnMap.put("buyerAddress","buyer_address");
		invoiceKeyColumnMap.put("byerTel","buyer_tel");
		invoiceKeyColumnMap.put("byerBank","buyer_bank");
		invoiceKeyColumnMap.put("byerAccount","buyer_account");
		invoiceKeyColumnMap.put("sellerName","seller_name");
		invoiceKeyColumnMap.put("sellerTaxNo","seller_tax_no");
		invoiceKeyColumnMap.put("sellerAddress","seller_address");
		invoiceKeyColumnMap.put("sellerTel","seller_tel");
		invoiceKeyColumnMap.put("sellerBank","seller_bank");
		invoiceKeyColumnMap.put("sellerAccount","seller_account");
		invoiceKeyColumnMap.put("contractNo","contract_no");
		invoiceKeyColumnMap.put("creatorId","creator_id");
		invoiceKeyColumnMap.put("createTime","create_time");
		invoiceKeyColumnMap.put("confirmId","confirm_id");
		invoiceKeyColumnMap.put("confirmTime","confirm_time");
		invoiceKeyColumnMap.put("confirmRemark","confirm_remark");
		tableKeyColumnMap.put("Invoice",invoiceKeyColumnMap);
		/** Invoice 结束*/

		/** Inventory 开始*/
		Map<String, String> inventoryKeyColumnMap = new HashMap<>();
		inventoryKeyColumnMap.put("warehouseId","warehouse_id");
		inventoryKeyColumnMap.put("docNo","doc_no");
		inventoryKeyColumnMap.put("goodsType","goods_type");
		inventoryKeyColumnMap.put("inventoryTime","inventory_time");
		inventoryKeyColumnMap.put("totalWeight","total_weight");
		inventoryKeyColumnMap.put("creatorId","creator_id");
		inventoryKeyColumnMap.put("updateTime","update_time");
		inventoryKeyColumnMap.put("createTime","create_time");
		tableKeyColumnMap.put("Inventory",inventoryKeyColumnMap);
		/** inventory 结束*/

		/** InventoryList 开始*/
		Map<String, String> inventoryListKeyColumnMap = new HashMap<>();
		inventoryListKeyColumnMap.put("inventoryId","inventory_id");
		inventoryListKeyColumnMap.put("categoryName","category_name");
		inventoryListKeyColumnMap.put("levelOne","level_one");
		inventoryListKeyColumnMap.put("levelTwo","level_two");
		inventoryListKeyColumnMap.put("levelThree","level_three");
		inventoryListKeyColumnMap.put("goodsId","goods_id");
		inventoryListKeyColumnMap.put("goodsName","goods_name");
		inventoryListKeyColumnMap.put("batchNo","batch_no");
		inventoryListKeyColumnMap.put("stockWeight","stock_weight");
		inventoryListKeyColumnMap.put("stockNum","stock_num");
		inventoryListKeyColumnMap.put("actualWeight","actual_weight");
		inventoryListKeyColumnMap.put("actualNum","actual_num");
		inventoryListKeyColumnMap.put("weightResult","weight_result");
		inventoryListKeyColumnMap.put("updateTime","update_time");
		inventoryListKeyColumnMap.put("createTime","create_time");
		inventoryListKeyColumnMap.put("creatorId","creator_id");
		tableKeyColumnMap.put("InventoryList",inventoryListKeyColumnMap);
		/** inventoryList 结束*/


		/** SalesReject 开始*/
		Map<String, String> salesRejectKeyColumnMap = new HashMap<>();
		salesRejectKeyColumnMap.put("docNo","doc_no");
		salesRejectKeyColumnMap.put("contractNo","contract_no");
		salesRejectKeyColumnMap.put("categoryCode","category_code");
		salesRejectKeyColumnMap.put("categoryName","category_name");
		salesRejectKeyColumnMap.put("updateTime","update_time");
		salesRejectKeyColumnMap.put("createTime","create_time");
		salesRejectKeyColumnMap.put("creatorId","creator_id");
		tableKeyColumnMap.put("SalesReject",salesRejectKeyColumnMap);
		/** SalesJect 结束*/

		/** MerchantInvoiceTitle 开始*/
		Map<String, String> merchantInvoiceTitleKeyColumn = new HashMap<>();
		merchantInvoiceTitleKeyColumn.put("merchantId","merchant_id");
		merchantInvoiceTitleKeyColumn.put("levelOneId","level_one_id");
		merchantInvoiceTitleKeyColumn.put("customName","custom_name");
		merchantInvoiceTitleKeyColumn.put("createTime","create_time");
		merchantInvoiceTitleKeyColumn.put("creatorId","creator_id");
		tableKeyColumnMap.put("MerchantInvoiceTitle",merchantInvoiceTitleKeyColumn);
		/** MerchantInvoiceTitle 结束*/

		ColumnUtil.VERSIONED_KEY_COLUMN_MAP.put(null, tableKeyColumnMap);
		// 字段名映射配置 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
		ColumnUtil.init();

		APIJSON_CREATOR = new APIJSONCreator();

		SIMPLE_CALLBACK = new SimpleCallback() {
			@Override
			public AbstractSQLConfig getSQLConfig(RequestMethod method, String database, String schema, String table) {
				return new XyerpSQLConfig(method, table);
			}

			@Override
			public Object newId(RequestMethod method, String database, String schema, String table) {
				return UUID.randomUUID().toString().replaceAll("-", "");
			}
		};
	}

	@Override
	public String getDBVersion() {
		return "5.1.38";
	}

	// 取消注释支持 !key 反选字段 和 字段名映射，需要先依赖插件 https://github.com/APIJSON/apijson-column
	@Override
	public AbstractSQLConfig setColumn(List<String> column) {
		return super.setColumn(ColumnUtil.compatInputColumn(column, getTable(), getMethod()));
	}
	@Override
	public String getKey(String key) {
		return super.getKey(ColumnUtil.compatInputKey(key, getTable(), getMethod()));
	}


}
